import java.io.Serializable;

public class Singelton01 implements Serializable {

    private static Singelton01 singelton = new Singelton01();

    private Singelton01() {
        System.out.println("Singelton01");
    }

    public static Singelton01 getInstance() {
        return singelton;
    }

    public Object readResolve(){
        return singelton;
    }

    public static void main(String[] args) {
        Singelton01 singelton1 = Singelton01.getInstance();
        Singelton01 singelton2 = Singelton01.getInstance();
        System.out.println(singelton1 == singelton2);
    }
}
